package com.yunfei.bo.simuBuy;

import com.yunfei.utils.string.StringUtil;

/**
 *@tablename PROD_ACCE_DTL
 *@author zhengyunfei
 * 私募购买流程实体类
 *@createDate Thu Jan 17 10:02:34 CST 2019
 */


public class DataKeyValueBo implements java.io.Serializable{
 private String name;//
 private String id;//

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    /**
    * @Description: 处理以逗号分隔的数据
    */
    public  DataKeyValueBo strToDataKeyValueBo(String key){
        DataKeyValueBo bo=new DataKeyValueBo();
            if(!StringUtil.isNullOrEmpty(key)){
                String keyArray[]=key.split(";");
                this.name=keyArray[0];
                bo.setName(this.name);
                if(keyArray.length==2){
                    this.id=keyArray[1];
                    bo.setId(this.id);
                }
            }

        return bo;
    }
}

